package manage.model;

import m.common.model.FieldMeta;
import m.common.model.LinkTableMeta;
import m.common.model.Model;
import m.common.model.TableMeta;
import m.common.model.type.FieldType;

import java.util.Date;

@TableMeta(name="os_action_log",description="请求记录表")
public class ActionLog extends Model {

    @FieldMeta(name="request_ip",type= FieldType.STRING,length=100,description="请求ip")
    private String requestIp;
    @FieldMeta(name="user_agent",type=FieldType.STRING,length=1000,description="User-Agent")
    private String userAgent;
    @FieldMeta(name="host",type= FieldType.STRING,length=200,description="主机")
    private String host;
    @FieldMeta(name="path",type= FieldType.STRING,length=200,description="路径")
    private String path;
    @LinkTableMeta(name="user_oid",table=ActionLogUser.class,description="操作用户")
    private ActionLogUser user;
    @LinkTableMeta(name="dept_oid",table=OrgGroupView.class,description="所在部门")
    private OrgGroupView dept;
    @FieldMeta(name="business",type=FieldType.STRING, defaultValue="A",description="类型",dictOption = "A:系统,B:业务,C:其他")
    private String business;
    @FieldMeta(name="title",type= FieldType.STRING,length=200,description="标题")
    private String title;
    @FieldMeta(name="description",type=FieldType.STRING,length=1000,description="描述")
    private String description;
    @FieldMeta(name="business_oid",type=FieldType.STRING,length=50,description="业务主键")
    private String businessOid;

    @FieldMeta(name="read_text",type= FieldType.STRING,dbType = "text",description="接收数据")
    private String readText;
    @FieldMeta(name="create_date",type= FieldType.DATE,description="创建时间")
    private Date createDate;
    @FieldMeta(name="back_text",type= FieldType.STRING,dbType = "text",description="返回数据")
    private String backText;
    @FieldMeta(name="process_time",type= FieldType.INT,description="处理时长|毫秒")
    private Integer processTime;
    @FieldMeta(name="status",type= FieldType.STRING,length=20,description="状态")
    private String status;

    public OrgGroupView getDept() {
        return dept;
    }

    public void setDept(OrgGroupView dept) {
        this.dept = dept;
    }

    public String getBusiness() {
        return business;
    }

    public void setBusiness(String business) {
        this.business = business;
    }

    public String getRequestIp() {
        return requestIp;
    }

    public void setRequestIp(String requestIp) {
        this.requestIp = requestIp;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getBusinessOid() {
        return businessOid;
    }

    public void setBusinessOid(String businessOid) {
        this.businessOid = businessOid;
    }

    public ActionLogUser getUser() {
        return user;
    }

    public void setUser(ActionLogUser user) {
        this.user = user;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getReadText() {
        return readText;
    }

    public void setReadText(String readText) {
        this.readText = readText;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getBackText() {
        return backText;
    }

    public void setBackText(String backText) {
        this.backText = backText;
    }

    public Integer getProcessTime() {
        return processTime;
    }

    public void setProcessTime(Integer processTime) {
        this.processTime = processTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
